How to convert a comma-separated string to an array in javascript